package com.kykj.kykjyzw.dao;


import com.kykj.kykjyzw.entity.RouteViewEntity;
import com.kykj.kykjyzw.entity.UserEntity;
import com.kykj.kykjyzw.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao {
     List<UserEntity> getAllUser();
     int delUser(@Param("uid")int uid); //删除用户

     int addUser(@Param("userVo")UserVo userVo); //添加用户
     int updateUser(@Param("userVo")UserVo userVo); //修改用户
     List<UserEntity> getUserByPage(
             @Param("uname") String uname,
             @Param("limit") int limit,
             @Param("start") int start
     ); //分页查询用户数据

     int getUserCount();

     UserEntity doLogin(@Param("uname") String uname,@Param("upwd") String upwd);

     List<RouteViewEntity> getUserRole(@Param("uname") String uname);//获取当前用户能访问的所有url

     int delUserDetail(@Param("uid") int uid);//删除用户详情
     int addUserDetail(@Param("uid") int uid);//添加用户详情
}
